



using System.Security.Principal;
using AdminSecurity.Extensions;
using Microsoft.AspNetCore.Authorization;
namespace  AdminSecurity.Extensions;

 
// UserNavigationAttribute.cs
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class UserNavigationAttribute(string userNavigationName) : AuthorizeAttribute($"{PolicyName}:{userNavigationName}")
{
    public const string PolicyName = "UserNavigation";

    public string UserNavigation_Name { get; } = userNavigationName;
}


